Table of contents

This report was created with shinyƉPICo.
(c) 2020 Octavio Morante-Palacios

Variable and samples selection

The group variable selected was Sample_Group, and the donor variable was Donor .

Finally, the selected samples added to the RGSet file were:

The following samples were excluded for the analysis:


Bad probes filtering

Before Minfi Normalization, probes in RGChannelSet are filtered using a standard p.value threshold (0.01):

RGSet [(rowMeans(as.matrix(minfi::detectionP(RGSet))) <0.01),]


QC and Array Normalization

The selected normalization method was Quantile. In the next plots, we can see the comparison of the processed data with the raw data.


QC Signal plot

In this plot, the average methylated signal vs the average unmethylated signal of each sample is represented. Both average signals should be higher than the signal threshold (10) to be considered OK. Lower or very variable signals can reflect problems in the sample material or in the scanning, but the user is responsible for deciding whether a sample should be excluded.

QC Bisulfite Conversion plot

Illumina 450k and EPIC arrays have probes to determine if bisulfite conversion has been successful or not. In this graph, the minimum ratio of converted/non-converted signal of bisulfite conversion II probes for each sample is represented.

Density plot

Raw

Processed (Quantile)


Boxplot

Raw

Processed (Quantile)

SNPs Heatmap

The methylation array has 65 specific SNP probes. These SNP probes are intended to be used for sample tracking and sample mixups. Each SNP probe ought to have values clustered around 3 distinct values corresponding to homo-, and hetero-zygotes. Therefore, different samples of the same donor should cluster together.

Processed (Quantile)

Sex Prediction

Depending on the average chromosome Y signal and the average chromosome X signal is possible to predict the sex of the sample donors.

name sex
MAC A M
MO B M
MAC C M
MO A M
MO C M
MAC B M

Principal Component Analysis

Plot of PCA is shown, with the selected principal components.

### Correlations

Correlating principal components with variables we can determine if Beta values are related to our variable of interest or other variables. This can also be useful to determine possible errors in the sample hybridization randomization and to select covariables to add to the linear model.

Not useful variables are discarded and the variable type is autodetected. The autodetected variable types were:

Predict sex and drop SNPs

After Minfi normalization, we obtained a GenomicRatioSet with some transformations depending on the type of normalization chosen. To understand better the different classes of Minfi packages, and their relations depending of the normalization method, please read this vignette of Minfi creators (it is also valid for Illumina EPIC arrays).

Moreover, we also removed SNP loci and added Sex information:

minfi::addSex(minfi::dropLociWithSnps(gset, maf = 0))


Differentially Methylated Positions (DMPs) calculation

Then, the linear model was generated using Sample_Group as variable of interest, Donor as covariable(s), and None as interaction(s).

The resulting design matrix was:

Optionally, ArrayWeights can be activated to weigh the value of each sample depending on their adjust to the linear model:


      if (weights_option){
        try({weights = limma::arrayWeights(MValues, design = design})
      }
        else { weights = NULL}
        
      fit = limma::lmFit(MValues, design, weights = weights)

Where weights is the option specified in the form. In this case, weights is FALSE .

The relation variance/average of the fit model was:

With this sample groups, the possible contrasts were:

MAC-MO

Using the calculated model, the t-statistics and p.values are obtained automatically for each contrast:

  mcontrast = makeContrasts(contrasts=contrast, levels = design)
  fitting = contrasts.fit(fit, mcontrast)
  fitting = eBayes(fitting, trend=trend, robust=robust)
  toptable = topTable(fitting, coef= 1,  adjust.method = "fdr", number =  Inf)

Where trend and robust are the options specified in the form. In this case, trend is TRUE and robust is TRUE .

Filtered results

For each contrast ( MAC-MO ) , the statistics for each CpG were generated and, after, filtered with these criteria:

  • Max. FDR: 0.05
  • Min. Δβ: 0.1
  • Max. pvalue: 1

Table with all contrasts

contrast Hypermethylated Hypomethylated total
MAC-MO 4551 560 5111

Custom heatmap

  • Column dendogram: TRUE
  • Scale: row
  • Cluster Algorithm: average
  • Distance: pearson

In the custom heatmap the selected contrasts to plot were: MAC-MO and the groups were: MAC, MO .


System and analysis information

This report was generated at 2020-08-27 18:41:35.

The session information was the following:

R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /home/octavio/R_4.0/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] IlluminaHumanMethylationEPICanno.ilm10b4.hg19_0.6.0 IlluminaHumanMethylationEPICmanifest_0.3.0         
 [3] minfi_1.34.0                                        bumphunter_1.30.0                                  
 [5] locfit_1.5-9.4                                      iterators_1.0.12                                   
 [7] foreach_1.5.0                                       Biostrings_2.56.0                                  
 [9] XVector_0.28.0                                      SummarizedExperiment_1.18.2                        
[11] DelayedArray_0.14.1                                 matrixStats_0.56.0                                 
[13] Biobase_2.48.0                                      GenomicRanges_1.40.0                               
[15] GenomeInfoDb_1.24.2                                 IRanges_2.22.2                                     
[17] S4Vectors_0.26.1                                    BiocGenerics_0.34.0                                
[19] shiny_1.5.0                                         shinyepico_0.1.0                                   

loaded via a namespace (and not attached):
  [1] BiocFileCache_1.12.1      plyr_1.8.6                lazyeval_0.2.2            splines_4.0.2            
  [5] BiocParallel_1.22.0       crosstalk_1.1.0.1         ggplot2_3.3.2             digest_0.6.25            
  [9] htmltools_0.5.0           viridis_0.5.1             gdata_2.18.0              magrittr_1.5             
 [13] memoise_1.1.0             doParallel_1.0.15         cluster_2.1.0             gclus_1.3.2              
 [17] limma_3.44.3              readr_1.3.1               annotate_1.66.0           askpass_1.1              
 [21] siggenes_1.62.0           prettyunits_1.1.1         colorspace_1.4-1          blob_1.2.1               
 [25] rappdirs_0.3.1            xfun_0.16                 dplyr_1.0.2               crayon_1.3.4             
 [29] RCurl_1.98-1.2            jsonlite_1.7.0            genefilter_1.70.0         GEOquery_2.56.0          
 [33] survival_3.1-12           glue_1.4.1                registry_0.5-1            gtable_0.3.0             
 [37] zlibbioc_1.34.0           webshot_0.5.2             Rhdf5lib_1.10.1           HDF5Array_1.16.1         
 [41] scales_1.1.1              DBI_1.1.0                 rngtools_1.5              Rcpp_1.0.5               
 [45] viridisLite_0.3.0         xtable_1.8-4              progress_1.2.2            bit_4.0.4                
 [49] mclust_5.4.6              preprocessCore_1.50.0     DT_0.15                   htmlwidgets_1.5.1        
 [53] httr_1.4.2                gplots_3.0.4              RColorBrewer_1.1-2        ellipsis_0.3.1           
 [57] farver_2.0.3              pkgconfig_2.0.3           reshape_0.8.8             XML_3.99-0.5             
 [61] dbplyr_1.4.4              reshape2_1.4.4            labeling_0.3              tidyselect_1.1.0         
 [65] rlang_0.4.7               later_1.1.0.1             AnnotationDbi_1.50.3      munsell_0.5.0            
 [69] tools_4.0.2               generics_0.0.2            RSQLite_2.2.0             evaluate_0.14            
 [73] stringr_1.4.0             fastmap_1.0.1             heatmaply_1.1.1           yaml_2.2.1               
 [77] knitr_1.29                bit64_4.0.2               shinycssloaders_1.0.0     beanplot_1.2             
 [81] caTools_1.18.0            scrime_1.3.5              purrr_0.3.4               dendextend_1.13.4        
 [85] nlme_3.1-148              doRNG_1.8.2               mime_0.9                  nor1mix_1.3-0            
 [89] xml2_1.3.2                biomaRt_2.44.1            BiocStyle_2.16.0          compiler_4.0.2           
 [93] shinythemes_1.1.2         rstudioapi_0.11           plotly_4.9.2.1            curl_4.3                 
 [97] statmod_1.4.34            tibble_3.0.3              stringi_1.4.6             highr_0.8                
[101] GenomicFeatures_1.40.1    lattice_0.20-41           Matrix_1.2-18             shinyjs_1.1              
[105] multtest_2.44.0           vctrs_0.3.2               pillar_1.4.6              lifecycle_0.2.0          
[109] BiocManager_1.30.10       data.table_1.13.0         bitops_1.0-6              seriation_1.2-8          
[113] httpuv_1.5.4              rtracklayer_1.48.0        R6_2.4.1                  TSP_1.1-10               
[117] promises_1.1.1            KernSmooth_2.23-17        gridExtra_2.3             codetools_0.2-16         
[121] gtools_3.8.2              MASS_7.3-52               assertthat_0.2.1          rhdf5_2.32.2             
[125] openssl_1.4.2             shinyWidgets_0.5.3        GenomicAlignments_1.24.0  Rsamtools_2.4.0          
[129] GenomeInfoDbData_1.2.3    hms_0.5.3                 quadprog_1.5-8            grid_4.0.2               
[133] tidyr_1.1.1               base64_2.0                rmarkdown_2.3             DelayedMatrixStats_1.10.1
[137] illuminaio_0.30.0